<?php 
use Yii\helpers\Html;
use yii\bootstrap\Nav;


//菜单

$menuItem = [];
if ($access = Yii::$app->params['access']) {
    isset($access['COURSE']['INDEX']) && $menuItem[] = ['label' => '课程展示', 'url' => ['/course/index']];
    isset($access['COURSE']['COUNT']) && $menuItem[] = ['label' => '课程统计', 'url' => ['/course/count']];
} else {
    $menuItem = [
        ['label' => '课程展示', 'url' => ['/course/index']],
        ['label' => '课程统计', 'url' => ['/course/count']],
    ];
}



echo Nav::widget([
    'options' => ['class' => 'nav nav-tabs mbm'],
    'items' => $menuItem,
]);

?>